import { createRouter, createWebHashHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'
import AdminEbook from "@/views/admin/AdminEbook";
import AdminCategory from "@/views/admin/AdminCategory";
import AdminDoc from "@/views/admin/AdminDoc";
import Doc from "@/views/Doc";
import AdminUser from "@/views/admin/AdminUser";

const routes = [
  {
    path: '/',
    name: 'home',
    component: HomeView
  },
  {
    path: '/doc',
    name: 'doc',
    component: Doc
  },
  {
    path: '/adminEbook',
    name: 'adminEbook',
    component: AdminEbook
  },
  {
    path: '/adminCategory',
    name: 'adminCategory',
    component: AdminCategory
  },
  {
    path: '/adminDoc',
    name: 'adminDoc',
    component: AdminDoc
  },
  {
    path: '/adminUser',
    name: 'adminUser',
    component: AdminUser
  },
  {
    path: '/about',
    name: 'about',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/AboutView.vue')
  }
]

const router = createRouter({
  history: createWebHashHistory(),
  routes
})

export default router
